﻿<%@ Page Title="" Language="C#" MasterPageFile="~/User.master" AutoEventWireup="true" CodeBehind="EditUser.aspx.cs" Inherits="doris.Ticketuser.EditUser" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type = "text/css">
.button
{
    float:left;
            width: 697px;
        }


</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    <br />
    <fieldset>

     <div class ="button">   
     <p> <asp:Label ID="Label2" runat="server" Text="Fullname" Font-Bold="True" 
             Width="100px"></asp:Label>
     <asp:TextBox ID="NameBox" runat="server" Width="355px" 
             ontextchanged="NameBox_TextChanged" Height="22px"></asp:TextBox>
             
             <asp:Label ID="Label5" runat="server" ForeColor="Red" Width="100px"></asp:Label>
     </p>
      <p> <asp:Label ID="Label3" runat="server" Text="Email" Font-Bold="True" 
              Width="100px"></asp:Label>
     <asp:TextBox ID="EmailBox" runat="server" Width="355px" 
              ontextchanged="EmailBox_TextChanged" style="margin-left: 0px"></asp:TextBox>
     
             <asp:Label ID="Label6" runat="server" ForeColor="Red"></asp:Label>
     </p>
      <p> 
          <asp:TextBox ID="PostcodeBox" runat="server"
          Width="103px" style="margin-left: 20px" ontextchanged="PostcodeBox_TextChanged"></asp:TextBox>
          <asp:TextBox ID="AddressBox" runat="server" Width="318px" ForeColor="#666666" 
              ReadOnly="True"></asp:TextBox>&nbsp;&nbsp;
          <asp:Button ID="Button1" runat="server" Text="Get Adress" onclick="Button1_Click" />
          <br />
          <asp:CompareValidator ID="CompareValidator1" runat="server" 
              ErrorMessage="Intergs only!" Operator="DataTypeCheck" Type ="Integer" 
              ControlToValidate="PostcodeBox" ForeColor="Red"></asp:CompareValidator>
             <br />
          <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
              ControlToValidate="PostcodeBox" ErrorMessage="Must consist 4 Numbers!" 
              ValidationExpression="\w{4,}" ForeColor="Red"></asp:RegularExpressionValidator>
              <br />
          <asp:Label ID="Label4" runat="server" ForeColor="Red"></asp:Label>
     </p>
     <asp:Button ID="OkButton" runat="server" Text="Change" Width="58px" 
             onclick="OkButton_Click" />
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          
     <asp:Button ID="CancelButton" runat="server" Text="Cancel" onclick="CancelButton_Click" Width="58px" />

     </div>
         </fieldset>
    <br />
    <div>
        <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource2" 
            BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" 
            CellPadding="2" ForeColor="Black" GridLines="None" Width="581px">
            <AlternatingRowStyle BackColor="PaleGoldenrod" />
            <FooterStyle BackColor="Tan" />
            <HeaderStyle BackColor="Tan" Font-Bold="True" />
            <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" 
                HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
            <SortedAscendingCellStyle BackColor="#FAFAE7" />
            <SortedAscendingHeaderStyle BackColor="#DAC09E" />
            <SortedDescendingCellStyle BackColor="#E1DB9C" />
            <SortedDescendingHeaderStyle BackColor="#C2A47B" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:localConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:localConnectionString.ProviderName %>" 
            SelectCommand="SELECT Username, Email, Fullname, Adress, Postcode FROM user WHERE (Username = @username)">
            <SelectParameters>
                <asp:SessionParameter DefaultValue="0" Name="username" SessionField="username" 
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        <br />
        <br />
        <div class ="button">          
        </div>
    </div>
</asp:Content>
